package cn.iocoder.yudao.module.hs.controller.admin.warehouse.vo;

import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat;
import cn.iocoder.yudao.framework.excel.core.convert.DictConvert;
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.time.LocalDateTime;

@Schema(description = "管理后台 - 仓库信息 Response VO")
@Data
@ExcelIgnoreUnannotated
public class WarehouseRespVO {

    @Schema(description = "仓库主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "24580")
    @ExcelProperty("仓库主键")
    private Long id;

    @Schema(description = "仓库编号", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("仓库编号")
    private String code;

    @Schema(description = "仓库名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "张三")
    @ExcelProperty("仓库名称")
    private String name;

    @Schema(description = "地区编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "28980")
    @ExcelProperty("地区编号")
    private Integer areaId;

    @Schema(description = "地区名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "28980")
    @ExcelProperty("地区名称")
    private String areaName;

    @Schema(description = "是否需要先进先出", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty(value = "是否需要先进先出", converter = DictConvert.class)
    @DictFormat("infra_boolean_string") // TODO 代码优化：建议设置到对应的 DictTypeConstants 枚举类中
    private Boolean firstInOut;

    @Schema(description = "是否有待出库区", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty(value = "是否有待出库区", converter = DictConvert.class)
    @DictFormat("infra_boolean_string") // TODO 代码优化：建议设置到对应的 DictTypeConstants 枚举类中
    private Boolean haveWaitingArea;


    @Schema(description = "分类", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty(value = "分类", converter = DictConvert.class)
    @DictFormat("warehouse_type") // TODO 代码优化：建议设置到对应的 DictTypeConstants 枚举类中
    private String warehouseType;

    @Schema(description = "仓库所在经纬度")
    private String longitudeLatitude;

    @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("创建时间")
    private LocalDateTime createTime;

    @Schema(description = "部门ID")
    private Long deptId;
}
